﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Data;

namespace MemoryGames.Games.WrongWord
{
    /// <summary>
    /// Interaction logic for Question.xaml
    /// </summary>
    public partial class Question : UserControl
    {
        public Question(DataRow questionData, DataRow[] answerData)
        {
            InitializeComponent();
         
            //Set question
            QuestionLabel.Content = questionData["Question"].ToString();

            //Add answers
            foreach (DataRow dr in answerData)
            {   Answer ctl = new Answer(dr);
                sp.Margin = new Thickness(5, 2, 5, 2);
                ctl.Margin = new Thickness(5,2,5,2);
                ctl.Padding = new Thickness(1,1,1,1);
                sp.Children.Add(new Answer(dr));
            }
        }
    }
}
